import request from '@/util/request'

export default {
    // 1. 查询所有学生
    findAllStudents(){
        return request({
            url: '/student/list',
            method: 'get',
        })
    },

    //2.分页查询
    findByPage(page,pageSize) {
        return request({
            url:`/student/findByPage/${page}/${pageSize}`,
            method: 'get',
        })
    },

    //3.条件查询带分页
    search(page,pageSize,data){
        return request({
            url: `/student/search/${page}/${pageSize}`,
            method: 'post',
            data
        })
    },
    //保存学生
    save(url,data){
        return request({
            url: url,
            method,//method的键与method值相等可省略
            data
        })
    },
    //删除学生
    deleteStudent(ids){
        return request({
            url:`/student/delete/${ids}`,
            method:"delete"
        })
    }


}



















